<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">

<head>
    <title th:text="${pageTitle}"></title>
    <div data-th-replace="layout/head-top"></div>
</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInLeft">
    <div data-th-replace="common/functionDepict"></div>
    <div>
        <div class="row">
            <div class="pt10">
                <div class="col-sm-9">
                    <div class="ibox float-e-margins">
                        <div class="ibox-title">
                            <h5>填写基本信息</h5>
                        </div>
                        <div class="ibox-content clearfix pt10">
                            <form class="form-horizontal m-t" id="activitySaveForm">
                                <div class="form-horizontal">
                                    <input name="id" value="" type="hidden"/>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label text-right"><i class="c-red">*</i>  活动名称</label>
                                        <div class="col-sm-8">
                                            <input class="validate-data form-control" type="text" name="activityName" />
                                            <span class="help-block m-b-none c-999"> 活动名称 限30个字以内</span>
                                        </div>
                                    </div>
                                    <div class="hr-line-dashed"></div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label text-right"><i class="c-red">*</i>  活动类型</label>
                                        <div class="col-sm-8">
                                            <div class="checkboxi-checks">
                                                <label><input id="activity_type_1" name="activityType_1" class="i-checks click" type="checkbox" value="1"/>满减</label>
                                                <label><input id="activity_type_2" name="activityType_1" class="i-checks click" type="checkbox" value="2"/>满赠</label>
                                            </div>
                                            <input type="hidden" id="activityType" value="" name="activityType"/>
                                            <input id="activityType1" type="hidden" value=""/>
                                            <input id="activityType2" type="hidden" value=""/>
                                        </div>
                                    </div>
                                    <div class="hr-line-dashed"></div>
                                    <div style="display:none;" id="tb1">
                                        <div class="form-group" >
                                            <label class="col-sm-2 control-label text-right"><i class="c-red">*</i>  要求金额</label>
                                            <div class="col-sm-8">
                                                <input class="validate-data form-control" type="text" name="askAmount"  />
                                                <span class="help-block m-b-none c-999"> 请输入最小消费订单金额数，可精确到小数点后两位，如100.1</span>
                                            </div>
                                        </div>
                                        <div class="hr-line-dashed"></div>
                                    </div>
                                    <div style="display:none;" id="tb1_1">
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label text-right"><i class="c-red">*</i>  消减金额</label>
                                            <div class="col-sm-8">
                                                <input class="validate-data form-control" type="text" name="subAmount" />
                                                <span class="help-block m-b-none c-999"> 请输入金额数，可精确到小数点后两位，如100.1</span>
                                            </div>
                                        </div>
                                        <div class="hr-line-dashed"></div>
                                    </div>
                                    <div   style="display:none;" id="tb2">
                                        <div class="form-group">
                                        <label class="col-sm-2 control-label text-right"><i class="c-red">*</i>  赠品设置</label>&nbsp;&nbsp;&nbsp;
                                        <label><input name="giftType_1"  class="i-checks"   type="checkbox" value="1"  />课程</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                        <label><input name="giftType_1"  class="i-checks" type="checkbox" value="2" />优惠券</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                            <!--积分功能业务不完善暂时注销-->
                                        <!--<label><input name="giftType_1"  class="i-checks" type="checkbox" value="3" />积分</label>-->
                                            <input type="hidden" id="giftType" value="" name="giftType"/>
                                            <input type="hidden" value="" id="activityGiftType1"/>
                                            <input type="hidden" value="" id="activityGiftType2"/>
                                            <input type="hidden" value="" id="activityGiftType3"/>
                                    </div>
                                    <div class="hr-line-dashed"></div>
                                        <div class="form-group activityCourse"  style="display:none;" id="tb3">
                                            <label class="col-sm-2 control-label text-right"><i class="c-red">*</i> 课程</label>
                                            <div class="col-sm-8">
                                                <input type="hidden" id="courseIds"  name="courseIds" />
                                                <p><button id="selectCourse" class="btn btn-primary " type="button"><i class="fa fa-plus"></i> 选择课程</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:void(0);" id="deleteAllCourse"><u>清空</u></a></p>
                                                <table class="table table-bordered">
                                                    <thead>
                                                    <tr>
                                                        <th class="text-center">ID</th>
                                                        <th class="text-center">课程名称</th>
                                                        <th class="text-center">专业/科目</th>
                                                        <th class="text-center">价格</th>
                                                        <th class="text-center">操作</th>
                                                    </tr>
                                                    </thead>
                                                    <tbody id="course-content">

                                                    </tbody>
                                                </table>
                                            </div>
                                        </div>
                                        <div class="hr-line-dashed activityCourse " style="display:none;"></div>
                                        <div class="form-group activityCoupon" style="display:none;" id="tb4">
                                            <div class="form-group">
                                                <input type="hidden" id="couponIds" name="couponIds" />
                                                <label class="col-sm-2 control-label text-right"><i class="c-red">*</i> 优惠券</label>
                                                <div class="col-sm-8">
                                                    <p><button id="selectCoupon" class="btn btn-primary " type="button"><i class="fa fa-plus"></i> 选择优惠券</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a  href="javascript:void(0);" id="deleteAllCoupon"><u>清空</u></a></p>
                                                        <table class="table table-bordered">
                                                            <thead>
                                                            <tr>
                                                                <th class="text-center">序号</th>
                                                                <th class="text-center">批次号</th>
                                                                <th class="text-center">金额、折扣</th>
                                                                <th class="text-center">消费范围</th>
                                                                <th class="text-center">操作</th>
                                                            </tr>
                                                            </thead>
                                                            <tbody id="coupon-content">

                                                            </tbody>
                                                        </table>
                                                    </div>
                                            </div>
                                            <div class="hr-line-dashed"></div>
                                            <div class="form-group">
                                            <label class="col-sm-2 control-label text-right"><i class="c-red">*</i>  赠送优惠券数量</label>
                                            <div class="col-sm-8">
                                                <input class="validate-data form-control" type="text" name="couponCount" />
                                                <span class="help-block m-b-none c-999">  只允许填写非 0 的正整数，如1</span>
                                            </div>
                                        </div>
                                        </div>
                                        <div class="hr-line-dashed activityCoupon" style="display:none;"></div>
                                        <div class="form-group activityIntegral"  style="display:none;" id="tb5">
                                            <label class="col-sm-2 control-label text-right"><i class="c-red">*</i>  赠送积分数量</label>
                                            <div class="col-sm-8">
                                                <input class="validate-data form-control" type="text" name="integral" />
                                                <span class="help-block m-b-none c-999">  只允许填写非 0 的正整数，如1</span>
                                            </div>
                                        </div>
                                        <div class="hr-line-dashed activityIntegral" style="display:none;"></div>
                                    </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label text-right"><i class="c-red">*</i> 活动时间</label>
                                    <div class="col-sm-10">
                                        <input placeholder="开始时间" class="laydate-icon form-control layer-date" id="start" name="beginTime" /> _
                                        <input placeholder="结束时间" class="laydate-icon form-control layer-date" id="end" name="endTime" />
                                        <span class="help-block m-b-none c-999">  请填活动时间</span>
                                    </div>
                                </div>
                                <div class="hr-line-dashed"></div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label text-right">活动页面</label>
                                    <div class="col-sm-8">
                                        <p>
                                            <button class="btn btn-primary " id="activityImageBtn" type="button"><i class="fa fa-image"></i>&nbsp;选择活动页面</button>
                                            <span>
                                                <small class="fs12 c-red">
                                                    &nbsp;&nbsp;&nbsp;*&nbsp;建议最大尺寸(宽*高 px)：1200*330&nbsp;&nbsp;或者比例:&nbsp;19:5
                                                </small>
                                            </span>
                                        </p>
                                        <div class="clearfix">
                                            <div class="file-box">
                                                <div class="file">
                                                    <span class="corner" title="删除" id="remove-image"><i class="fa fa-remove"></i></span>
                                                    <div class="image">
                                                        <input type="hidden" id="imageJson" name="imageJson" />
                                                        <img alt="image" id="activity-image" class="img-responsive" th:src="@{{path}/admin/v3/img/default/default-pic.jpg?v={v}(path=${staticPath},v=${v})}">
                                                    </div>
                                                    <div class="file-name">
                                                        <p id="file-names"></p>
                                                        <small id="create-time">添加时间：</small>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="hr-line-dashed"></div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label text-right"> <i class="c-red">*</i> 活动说明</label>
                                    <div class="col-sm-9">
                                        <textarea id="activityInfo" class="form-control" name="depict" ></textarea>
                                    </div>
                                </div>
                                <div class="hr-line-dashed"></div>
                                <div class="form-group">
                                <div class="col-sm-10 col-sm-offset-2">
                                    <button class="btn btn-danger submitMaterial" data-status="2" id="submitActivity" type="button">保存</button>
                                    <button class="btn btn-white ml10" id="onBack" type="button">取消</button>
                                </div>
                            </div>
                            </div>
                            </form>
                        </div>
                    </div>
                </div>
                <div data-th-replace="common/importantNotes"></div>
            </div>
        </div>
    </div>
</div>
<div data-th-replace="layout/head-footer"></div>
<script type="text/javascript" th:src="@{{path}/admin/business/op/activity/save-activity.js?v={v}(path=${staticPath},v=${v})}"> </script>
<script type="text/javascript" th:src="@{{path}/admin/business/course/cou/select-common-course.js?v={v}(path=${staticPath},v=${v})}"></script>
<script type="text/javascript" th:src="@{{path}/admin/business/upload/common-webuploader.js?v={v}(path=${staticPath},v=${v})}"></script>
<script type="text/javascript" th:src="@{{path}/admin/libs/plugins/layer/laydate/laydate.js?v={v}(path=${staticPath},v=${v})}"></script>
</body>

</html>
